import request from '@/utils/request'

//条件查询带分页
export function getHospitalList(page,limit,searchObj) {
  return request({
    url: `/admin/hosp/hospital/list/${page}/${limit}`,
    method: 'post',
    data: searchObj
  })
}
//根据dictCode获取下级结点
export function getByDictCode(dictCode) {
    return request({
      url: `/admin/cmn/dict/findByDictCode/${dictCode}`,
      method: 'get'
    })
}
//修改状态
export function updateHospitalStatus(id,status) {
  return request({
    url: `/admin/hosp/hospital/updateStatus/${id}/${status}`,
    method: 'put'
  })
}
//根据id查询医院详情
export function findHospitalById(id) {
  return request({
    url: `/admin/hosp/hospital/findHospitalById/${id}`,
    method: 'get'
  })
}
//根据id查询科室信息
export function getDeptList(hoscode) {
  return request({
    url: `/admin/hosp/hospital/getDeptList/${hoscode}`,
    method: 'get'
  })
}


//查询排班规则
export function getScheduleRule(page,limit,hoscode,depcode) {
  return request({
    url: `/admin/hosp/schedule/getScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
    method: 'get'
  })
}
//查询排班详情信息
export function getScheduleList(hoscode,depcode,workDate) {
  return request({
    url: `/admin/hosp/schedule/getScheduleList/${hoscode}/${depcode}/${workDate}`,
    method: 'get'
  })
}